#include "long_float.hpp"

#include <cstring>
LongFloat operator + (const LongFloat& a, const LongFloat& b) {
    LongFloat r(a);
    return r+=b;
}

LongFloat operator - (const LongFloat& a, const LongFloat& b) {
    LongFloat r(a);
    return r-=b;
}

LongFloat operator * (const LongFloat& a, const LongFloat& b) {
    LongFloat r(a);
    return r*=b;
}

LongFloat operator / (const LongFloat& a, const LongFloat& b) {
    LongFloat r(a);
    return r/=b;
}


LongFloat::LongFloat(int n, int precision)
{
}


LongFloat::LongFloat(double a, int precision)
{
}


LongFloat::LongFloat(const char* str, int precision)
{
}

LongFloat::LongFloat(const LongFloat& a, int precision)
{
}

LongFloat::LongFloat(const LongFloat& a)
{
}

LongFloat& LongFloat::operator = (const LongFloat& a)
{
    if (this != &a)
    {
        m_Sign = a.m_Sign;
        m_Exponent = a.m_Exponent;
        if (m_Precision != a.m_Precision)
        {
            delete m_Mantissa;
            m_Mantissa = new CoefType[m_Precision];
        }
        memcpy(m_Mantissa, a.m_Mantissa, m_Precision*sizeof(CoefType));
        m_Precision = m_Precision;
    }
}
